when high court can entertain writ petition